home *** CD-ROM | disk | FTP | other *** search
- Path: axe.netdoor.com!news
- From: esargent@netdoor.com (Eric Sargent)
- Newsgroups: comp.lang.c
- Subject: Re: void pointers
- Date: Fri, 12 Jan 1996 20:46:39 GMT
- Organization: Internet Doorway, Inc.
- Message-ID: <4d6h8k$p6u@axe.netdoor.com>
- References: <1996Jan12.133322.1@ccc.govt.nz>
- NNTP-Posting-Host: port91.netdoor.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- mcauslanb@ccc.govt.nz wrote:
-
- >I am writing a C program for an application that has a development language
- >based on ANSI C.
-
- >A function that I need to call is defined:
- > void getFence (void **clipPP);
-
- > where "clipPP" is returned by the function.
-
- >1) How do I declare and pass clipPP?
-
- void (char, etc..) *clipPP;
-
- getFence(&clipPP); (may need to be cast if not a void pointer)
-
- >2) What is actually going on?
-
- You are passing a pointer to a pointer to something. Specific
- operations will affect clipPP in the calling program. For example if
- getFence allocates ram for clipPP:
-
- *clipPP = malloc(size);
-
- Eric
-
-
-